#include "lost-kingdom.h"

void printkader(string text);

int doemenu(void)
{
	SDL_Event menuevent;
	bool running = true;
	int keuze;
	char x;
	
	printkader("lost kingdom");
	
	cout << "N: New game" << endl;
	cout << "O: Option" << endl;
	cout << "C: Credits" << endl;
	cout << "Q: Exit" << endl;
	
	cin >> x;
	x = toupper(x);

vraagkeuze:
	switch(x)
	{
		case 'N':
			keuze = MENU_NEWGAME;
		break;
		
		case 'O':
			keuze = MENU_OPTIONS;
		break;
		
		case 'C':
			keuze = MENU_CREDITS;
		break;
		
		case 'Q':
			keuze = MENU_EXIT;
		break;
		
		default:
			cout << "ongeldige keuze" << endl;
			goto vraagkeuze;
	}
	
	return keuze;
}

void printkader(string text)
{
	int max;
	max = text.length()+2;
	for(int i = 1; i <= max; i++)
	{
		cout << "*";
	}
	cout << endl << "*" << text << "*" << endl;
	for(int i = 0; i <= max; i++)
	{
		cout << "*";
	}
	cout << endl;
}
